Skip Headers
Oracle® Enterprise Manager Lifecycle Management Administrator's Guide
12c Release 3 (12.1.0.3)

Part Number E27046-14
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

34 Using Oracle Site Guard

This chapter describes how to set up Oracle Site Guard for your existing Oracle Fusion Middleware disaster recovery solution, to perform operations like switchover and failover on the primary site and the standby site.

It contains the following topics:

What is New in Oracle Site Guard for Enterprise Manager Cloud Control 12c Release 2

Following are the new features available in Oracle Site Guard Enterprise Manager Cloud Control 12c Release 4 (Fusion Middleware plug-in release 12.1.0.4):

  • Contains GUI for Oracle Site Guard operations

  • Supports Fusion Instances for site representation

  • Supports deletion of steps in operation plans

  • Supports named credentials for ZFS storage

  • Supports non-shell script execution

Important Notes Before You Begin

Read the following notes before you start configuring Oracle Site Guard for Oracle Fusion Middleware components:

  • See "Terminology" in the Oracle Fusion Middleware Disaster Recovery Guide to understand the disaster recovery and Oracle Site Guard terminology used in this chapter.

  • See "Recommendations for Fusion Middleware Components" in the Oracle Fusion Middleware Disaster Recovery Guide before you configure Oracle Site Guard for Oracle Fusion Middleware.

Ensure that the disaster recovery environment is set up according to Oracle-recommended guidelines. For more information, see the following sections in the Oracle Fusion Middleware Disaster Recovery Guide:

  • Ensure that host names are configured, as described in "Planning Host Names" in the Oracle Fusion Middleware Disaster Recovery Guide.

  • Ensure that virtual IP addresses and virtual host names are configured, as described in "Virtual IP and Virtual Hostname Considerations" in the Oracle Fusion Middleware Disaster Recovery Guide.

  • Read "Storage Considerations" in the Oracle Fusion Middleware Disaster Recovery Guide.

  • Read "Database Considerations" in the Oracle Fusion Middleware Disaster Recovery Guide.

  • Ensure that you have configured Oracle Data Guard to provide disaster recovery for Oracle Database, as described in "Database Considerations" in the Oracle Fusion Middleware Disaster Recovery Guide.

    Note:

    Oracle Site Guard requires a database to be set up using Oracle Data Guard Broker. If Oracle Databases in a site are protected by Oracle Data Guard, you must configure Oracle Data Guard Broker for Oracle Data Guard, as described in the Oracle Data Guard Broker guide.
  • Ensure that you have an existing Oracle Fusion Middleware disaster recovery setup, as described in "Setting Up and Managing Disaster Recovery Sites" in the Oracle Fusion Middleware Disaster Recovery Guide.

Overview of Oracle Site Guard

Oracle Site Guard primarily orchestrates switchover and failover between two disaster recovery sites. These sites should be created, as described in this chapter. Oracle Site Guard offers the following features:

  • Ensures high availability, data protection, and disaster recovery for enterprise data.

  • Performs Oracle Site Guard operations like switchover and failover. If the primary site becomes unavailable due to a planned or an unplanned outage, a Switchover or Failover process needs to be initiated using Oracle Site Guard.

This section includes the following topics:

Benefits of Oracle Site Guard

Oracle Site Guard provides the following benefits:

Reduction of Errors Due to Prepared Responses

Oracle Site Guard helps in reducing the possibility of human error in case of disasters. The recovery strategies are mapped out, tested, and rehearsed in prepared responses within the application. After starting an Oracle Site Guard operation for disaster recovery, human intervention is not required.

Storage Integration

Oracle Site Guard provides an easy mechanism to integrate with any storage. It integrates with storage appliances to perform switchover or failover, by using callouts to any user-specified storage role reversal scripts in the operation workflow.

Target Dependencies

Oracle Site Guard automatically handles dependencies between the targets while starting or stopping a site.

End-to-End Disaster Recovery Automation

Oracle Site Guard provides an end-to-end orchestration of disaster recovery operations by loosely integrating with storage appliances, to perform storage role reversals. It simultaneously integrates with Oracle Data Guard Broker to perform database role reversals. Oracle Site Guard then shuts down the primary site before performing disaster recovery operations like switchover or failover and brings up the standby site after the Oracle Site Guard operation is completed.

Oracle Site Guard Operations

Oracle Site Guard ensures high availability, data protection, and disaster recovery for Oracle Fusion Middleware 11g. It automates the following Oracle Site Guard operations:

  • Stopping a site

  • Starting a site

  • Site Switchover

  • Site Failover

Site Representation in Enterprise Manager Cloud Control

A site is a collection of related targets in a data center. Oracle Site Guard performs operations like start-site, stop-site, switchover, and failover, on the site. It is required to run a group of applications simultaneously. For example, a site could consist of Oracle Fusion Middleware instances, databases, and storage devices. Oracle Site Guard uses the Enterprise Manager Cloud Control generic system target to represent a site. Every site, whether primary or standby, is represented as a generic system, which is a collection of other target types, such as Oracle Database and Oracle Fusion Middleware Domain. Oracle Site Guard only supports Enterprise Manager deployments where both primary and standby sites are managed by a single Enterprise Manager Cloud Control instance.

Figure 34-1 shows an overview of an Oracle Fusion Middleware Disaster Recovery topology managed by a single Enterprise Manager Cloud Control instance.

Figure 34-1 Primary and Standby Site for Oracle Fusion Middleware Disaster Recovery Topology Managed by Enterprise Manager Cloud Control

Description of Figure 34-1 follows
Description of "Figure 34-1 Primary and Standby Site for Oracle Fusion Middleware Disaster Recovery Topology Managed by Enterprise Manager Cloud Control"

The following are the key aspects of the topology in Figure 34-1:

  • A single Enterprise Manager Cloud Control instance monitors the primary site and the standby site.

  • Oracle Management Agent (EM Agent) is installed on all hosts in the primary site and the standby site. For example:

    • OPMN managed system components (WEBHOST1 and WEBHOST2)

    • Oracle Fusion Middleware Applications (APPHOST1 and APPHOST2)

    • Oracle RAC Database (DBHOST1 and DBHOST2)

    Oracle Management Agent (EM Agent) is one of the core components of Enterprise Manager Cloud Control that enables you to convert an unmanaged host to a managed host in the Enterprise Manager system. The Management Agent works in conjunction with the plug-ins to manage the targets running on that managed host.

  • When there is a failure or planned outage of the primary site, Oracle Site Guard automates the following steps to enable the standby site to assume the production role in the topology:

    1. Stops services and applications running on the primary site, and unmounts the storage on the primary site.

    2. Stops the replication from the primary site to the standby site (when a failure occurs, replication stops due to the failure), and performs storage role reversal.

    3. Performs a failover or switchover of the Oracle Databases using Oracle Data Guard Broker.

    4. Mounts the storage on the standby site.

    5. Starts the services and applications on the standby site, and assumes the production role.

    Note:

    If continuous replication is not configured, Oracle recommends that you create a final replication between the primary and the standby sites, before the storage switchover.

Terminology Used in Oracle Site Guard

The following terms are used throughout this chapter when discussing about Oracle Site Guard:

  • Site

    A site is a set of different targets in a datacenter needed to run a group of applications. For example, a site could consist of Oracle Fusion Middleware instances, databases, storage, and so on. A datacenter may have more than one site defined by Oracle Site Guard and each of them managed independently for operations like switchover and failover.

  • Site Failover

    The process of making the current standby site the new primary site after the primary site becomes unexpectedly unavailable (for example, due to a disaster at the primary site). This book also uses the term "failover" to refer to a site failover.

  • Site Switchover

    The process of reversing the roles of the primary site and standby site. Switchovers are planned operations done for periodic validation or to perform planned maintenance on the current primary site. During a switchover, the current standby site becomes the new primary site, and the current primary site becomes the new standby site. This book also uses the term "switchover" to refer to a site switchover.

  • Oracle Site Guard Configuration

    An Oracle Site Guard configuration contains settings such as, site creation, pre-scripts or post-scripts, storage, and credentials that are applicable to its operations.

  • Target

    Targets are core Enterprise Manager entities which represent the infrastructure and business components in an enterprise. These components need to be monitored and managed for efficient functioning of the business. For example, Oracle Fusion Middleware farm or Oracle Database.

  • Generic System

    A System is the set of targets (hosts, databases, application servers, and so on) that work together to host your applications. To monitor an application in Enterprise Manger, you would first create a System, that consists of the database, listener, application server, and hosts targets on which the applications run.

  • Operation Plan

    An operation plan contains the flow of execution for a particular Oracle Site Guard operation. It defines the order in which the steps of an operation plan should be executed, in addition to other attributes, such as, serial, parallelism, and so on.

  • Fusion Instance

    A Fusion instance target represents one or more Fusion product families, which in turn contain Fusion products and Fusion Cluster Application instances.

Using Oracle Site Guard: Overview

This section briefly describes how to use Oracle Site Guard to orchestrate switchover or failover operations between two sites. It contains the following topics:

Task Overview

Figure 34-2 shows a flow chart of the tasks that you need to perform while using Oracle Site Guard for switchover or failover operations.

Figure 34-2 Task Overview of Oracle Site Guard

Description of Figure 34-2 follows
Description of "Figure 34-2 Task Overview of Oracle Site Guard"

Task Roadmap

Table 34-1 describes each of the steps in the task-overview flow chart, which is shown in Figure 34-2. The table also provides pointers for to get more information about each of the task in the process.

Table 34-1 Table Describing the Steps for Using Oracle Site Guard

Task Description More Information

Discover targets on the primary site and standby site

The Oracle Enterprise Manager Cloud Control Administrator's Guide guide provides a high-level overview of how to discover targets on a primary site.

Discovering Targets on the Primary Site and the Standby Site

Create generic systems or use Fusion instances for primary site and standby site

Oracle Site Guard uses the Enterprise Manager Cloud Control generic system target to represent a site. Oracle Site Guard Enterprise Manager Cloud Control 12c Release 4 now supports Fusion instances for site representation.

Creating Primary and Standby Sites

Create credentials for Oracle Site Guard using EMCC or EMCLI

Create named and preferred credentials before associating them with the Oracle Site Guard configuration.

Creating Credentials

Configure software library using EMCC or EMCLI

Oracle Software Library (Software Library) is a repository that stores scripts that Oracle Site Guard requires, to execute the operation plan. Configuring Oracle Software Library is a one-time process.

Configuring the Software Library

Configure Oracle Site Guard on primary and standby sites

Configure Oracle Site Guard on primary sites and standby sites.

Configuring Oracle Site Guard

Create custom pre scripts and post scripts

You need to create pre-scripts, post-scripts, and storage scripts before configuring Oracle Site Guard

Custom scripts (pre-scripts and post-scripts) can be created and executed at the site level, for a given Oracle Site Guard operation. This is an optional configuration.

Creating Pre-Scripts and Post-Scripts

Create storage mount or unmount, or switchover or failover scripts

Create storage scripts (mount, unmount, switchover, failover) to manage storage-related tasks during switchover and failover operations.

Creating Storage Scripts

Associate credentials with Oracle Site Guard using EMCLI commands or EMCC

After you create named and preferred credentials, ensure that you associate them with the Oracle Site Guard configuration.

Associating Credentials

Update credential association

After you associate credentials with Oracle Site Guard configuration, you can update them later, as required.

Associating Credentials

Associate custom scripts with Oracle Site Guard using EMCLI commands or EMCC

If you need to execute one or more custom scripts (pre-scripts and post-scripts) as part of a Oracle Site Guard operation workflow, ensure that you associate it with the Oracle Site Guard configuration.

Associating Pre-Scripts and Post-Scripts

Update custom scripts association

After you associate custom scripts with the Oracle Site Guard configuration, you can update them later, as required.

Associating Pre-Scripts and Post-Scripts

Associate storage script with Oracle Site Guard using EMCLI or EMCC

The storage scripts (mount, unmount, switchover, failover) need to be associated with Oracle Site Guard configuration. These scripts are then executed at designated points in the Oracle Site Guard switchover or failover workflow.

Associating Storage Scripts

Update storage scripts association

After you associate storage scripts with Oracle Site Guard configuration, you can update them later, as required.

Associating Storage Scripts

Create operation plans using EMCLI or EMCC, to execute Oracle Site Guard operation

An operation plan contains the execution flow for the Oracle Site Guard operation. You can either use the default operation plan or update it to change the order of targets within their corresponding steps.

Creating an Operation Plan

Run operation plans using EMCLI or EMCC, to switchover or failover, or to start or stop sites

After an operation plan is created for a particular operation type, you can execute it when required, to perform the corresponding operation.

- Stopping a Site

- Starting a Site

- Performing Site Switchover

- Performing Site Failover

Monitor the operation plan execution using EMCC or EMCLI

After executing an operation plan, you can monitor its status using the EMCC console.

Monitoring an Operation Plan


Installing Oracle Site Guard

Oracle Site Guard is included with Enterprise Manager Cloud Control 12c Release 1 (12.1.0.4). You can manage an Oracle Site Guard configuration by using Enterprise Manager Command-Line Interface (EMCLI) or console. To install Oracle Site Guard, complete the following steps:

Note:

For information about Oracle Site Guard licensing, see Oracle Enterprise Manager Licensing Information.
  • Install Enterprise Manager Cloud Control 12c Release 1 (12.1.0.4) for your existing Oracle Fusion Middleware enterprise deployment. For information about installing Enterprise Manager Cloud Control 12 c Release 1 (12.1.0.4), see "Oracle Enterprise Manager Cloud Control Basic Installation Guide.

    Note:

    Ensure that you install Oracle Management Agent (Enterprise Manager Agent) on each of the hosts managed by Enterprise Manager, as described in the chapter "Installing Oracle Management Agent" in the Oracle Enterprise Manager Cloud Control Basic Installation Guide.
  • Install the Enterprise Manager Command-Line Interface (EMCLI), as described in the chapter "Command Line Interface Concepts and Installation" in the Oracle Enterprise Manager Command Line Interface Guide.

    Note:

    Oracle recommends that you install EM CLI in the same Oracle home where Oracle Management Service is installed. For example, OMS_HOME/bin/emcli.

Prerequisites for Configuring Oracle Fusion Middleware Products on Oracle Site Guard

Complete the following prerequisites for configuring Oracle Fusion Middleware 11g products on Oracle Site Guard:

Discovering Targets on the Primary Site and the Standby Site

Oracle Site Guard supports discovery of the following target types:

  • Oracle Fusion Middleware farm

  • Oracle Fusion Middleware managed system components, such as Oracle HTTP Server and Oracle Internet Directory (part of the Oracle Fusion Middleware farm)

  • Real Application Cluster (RAC) databases

  • Single instance database

For a two-site deployment, the targets in the primary site should be discovered first, followed by the targets in the standby site.

A site should be up for its targets to be discovered. For a two-site deployment, you must first discover the targets in the primary site. Once you discover the targets in the primary site, you must manually perform a switchover operation, so that the standby site takes over the production role, as described in "Performing a Switchover" in Oracle Fusion Middleware Disaster Recovery Guide

After performing a switchover, you can discover the targets for the standby site by completing the steps described in "Discovering and Monitoring Targets" in the Oracle Enterprise Manager Cloud Control Administrator's Guide.

Note:

After you discover the targets for the standby site, you must manually perform a switchover operation, so that the primary site takes over the production role, as described in "Performing a Switchover" in Oracle Fusion Middleware Disaster Recovery Guide.

Creating Primary and Standby Sites

You can create a generic system or use an existing Fusion instance to create primary and standby sites. Each generic system or Fusion instance that you use, must include all targets, Oracle Fusion Middleware farms and Databases, pertaining to the site that it represents.

To create a generic system, use one of the following methods:

Creating a Generic System Using Enterprise Manager Cloud Control Console

To create a generic system for the primary site, using an Enterprise Manager Cloud Control console, complete the following steps:

  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  3. Select Generic System (or Fusion Instance if Site Guard is configured on a Fusion instance) from the drop-down menu. Click Add.

  4. In the General section, enter the name for your primary system.

  5. In the Member section, click Add.

  6. Choose the targets, and click Select. You must associate the following:

    • Oracle Fusion Middleware Farm which includes:

      • Administration Server

      • Managed Servers

      • OPMN-managed system components

    • If you are using Oracle RAC Database then you must associate it with a Cluster Database target. For a single database instance, you must associate it with a Database Instance target.

    Note:

    Ensure that the following target types are not added to the generic system:
    • Database System

    • Individual RAC Database instances

  7. Select the time zone from the drop-down menu.

  8. Click Next.

    The Define Associations page is displayed.

  9. Click Next.

    The Availability Criteria page is displayed.

  10. From Availability Criteria, select the Any Of The Key Members option.

  11. Select AdminServer in the Members pane and double-click.

    The AdminServer is removed from the Members pane and added in the Key Members pane.

  12. Click Next.

    The Charts page is displayed.

  13. Click Next.

    The Review page is displayed.

  14. Review your settings, and click Finish.

Creating a Generic System Using EMCLI Commands

Create a generic system by running the following emcli commands (located at OMS_HOME/bin/emcli) in the command-line interface:

Note:

For information about setting up a new EMCLI client, see the Enterprise Manager Command-Line Interface Download page within the Cloud Control console. To access the page, in Cloud Control, from the Setup menu, click Command Line Interface.
emcli create_system
      -name="name"
      -type=system
      -add_members="name1:type1;name2:type2;..."]...
      -timezone_region="actual_timezone_region"

Note:

To get status and alert information for targets, you can run emcli get_targets command. For more information, see the chapter "Verb Reference" in the Oracle Enterprise Manager Command Line Interface Guide.
Parameter Description
-name Enter a name for the system.
-type Enter generic_system as the type.
-add_members Add existing targets to the system. Each target is specified as a name-value pair target_name:target_type. You can specify this option more than once.
-timezone_region Specify the time zone region. The time zone you specify here is used for scheduling operations such as jobs and blackouts, on the system.

See "create_system" in the Oracle Enterprise Manager Command Line Interface Guide.

Creating Credentials

Create named credentials or preferred credentials for the following targets associated with Oracle Site Guard, using Enterprise Manager Cloud Control Console:

  • Host (for normal user)

  • Host (users with root privileges)

  • Oracle WebLogic Server

  • Oracle Database

This section contains the following sections:

Notes:

  • The credentials created here are later associated with the Oracle Site Guard configuration. Oracle Site Guard supports specifying the same credentials for all targets of the same target type. For example, all databases in a system can have the same sysdba credentials. Oracle Site Guard also allows the targets of same kind to have different credentials.

  • If the credentials are the same across the nodes (primary and standby site), you need not create credentials for the targets running on the standby site.

Creating Named Credentials Using Enterprise Manager Cloud Control Console

To create a named credentials using Enterprise Manager Cloud Control Console, complete the following steps:

  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Setup menu, select Security, then select Named Credentials.

    The Named Credentials page is displayed.

  3. Click Create.

    The Create Credential page is displayed.

  4. In the General Properties section, specify the following:

    • Credential name: Enter a name for the credential.

    • Credential description: Enter the credential description.

    • Authenticating Target Type/ Credential type/ Scope: Enter the details as specified in the following table:

      Element Host Details Host (root-User Privileges) Details Oracle WebLogic Server Database Instance
      Authenticating Target Type Host Host Oracle WebLogic Server Database Instance
      Credential type Host Credentials Host Credentials Oracle WebLogic Credentials Database Credentials
      Scope Global Global Global Global

  5. In the Credential Properties section, specify the following:

    • UserName: Enter the username.

    • Password: Enter the password.

    • Confirm Password: Enter the password again.

    • Run Privilege/ Role: Enter the details as specified in the following table:

      Element Host Host (Users with root privileges) Oracle WebLogic Server Database Instance
      Run Privilege None Select Sudo and enter values in the Run As fields Oracle WebLogic Server Administration user credentials Oracle Database SYS user credential
      Role None None None SYSDBA

  6. Click Test and Save. To test credentials, select the appropriate Test Target Type from the drop-down menu for which you want to test the credentials, and specify Test Target Name.

Creating Named Credentials Using EMCLI Commands

You can create a named credential by running the following emcli commands in the command-line interface:

emcli create_named_credential
         -cred_name="cred_name"
         -auth_target_type="auth_target_type"
         -cred_type="cred_type"
         -attributes="p1:v1;p2:v2"
Parameter Description
cred_name Sets the name for this credential set.
auth_target_type Set the authenticating target type.
cred_type Set the credential type for the target/credential set.
attributes Enter the following credential column values:
colname:colvalue;colname:colvalue

You can change the value of the separator using -separator=attributes=newvalue. You can also change the value of the sub-separator using -subseparator=attributes=newvalue.


Setting Preferred Credentials Using Enterprise Manager Cloud Control Console

To set preferred credentials using the Enterprise Manager Cloud Control Console, follow these steps:

  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Setup menu, select Security, then select Named Credentials.

    The Named Credentials page is displayed.

  3. Select a target type, and click Manage Preferred Credentials. The target specific Preferred Credentials page is displayed.

  4. Select the credential type from the Default Preferred Credentials table, and click Set. The Select Named Credential pop-up window is displayed.

  5. Select an existing named credential to be the Preferred Credential, or select New to create a new named credential to be set as Preferred Credential.

    Enter a username and password for the credential.

    Enter a credential name, and select Save As. The credential will be saved with the name that you have provided.

    Click Test and Save.

Setting Preferred Credentials Using EMCLI Commands

You can set a named credential as a target-preferred credential by running the following emcli commands in the command-line interface:

Note:

Oracle recommends that you to set the preferred credential using the emcli commands.
emcli set_preferred_credential 
        -set_name="set_name"
        -target_name="target_name"
        -target_type="type"
        -credential_name="name"
        [-credential_owner ="owner]"

Note:

[ ] indicates that the parameter is optional.
Parameter Description
set_name Sets the preferred credential for this credential set.
target_name Sets the preferred credential for this target.
target_type Target type for the target/credential set.
credential_name Name of the credential.
credential_owner Owner of the credential. This defaults to the currently logged-in user.

Example:

emcli set_preferred_credential 
        -set_name="HostCredsNormal"
        -target_name="test.example.com"
        -target_type="host"
        -credential_name="MyHostCredentials"
        -credential_owner="Admin"

Configuring the Software Library

Oracle Software Library (Software Library) is a repository that stores scripts required by Oracle Site Guard to execute the operation plan.

You can configure the storage location for the software library using one of the following methods:

Configuring Storage Location for Software Library Using Enterprise Manager Cloud Control Console

To configure the storage location for the Oracle Software Library, complete the following steps:

Note:

Configuring Oracle Software Library is a one-time process. Enterprise Manager requires you to configure Oracle Software Library before proceeding with any deployment-procedure related tasks. Perform the steps listed in this section after confirming that Oracle Software Library is not configured.
  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Setup menu, select Provisioning and Patching, then select Software Library.

    The Software Library: Administration page is displayed.

  3. Select OMS Shared Filesystem from the Storage Type drop-down box.

  4. Click Add.

  5. Specify a Name and Location that is accessible to all OMS and click OK.

    Note:

    As the storage location for the Software Library must be accessible to all OMS as local directories, in a multi-OMS scenario, you must set up a clustered filesystem using OCFS2 or NFS. For single OMS systems, any local directory is sufficient.

A job is executed to upload all the out-of-box content.

Note:

For more information, see "Configuring Software Library" in the Oracle Enterprise Manager Cloud Control Administrator's Guide.

Configuring Storage Location for Software Library Using Enterprise Manager Command-Line Interface

You can configure storage location in the software library by running the following EMCLI command in the command-line interface:

emcli add_swlib_storage_location 
       -name="name_of_software_library" 
       -path="/var/tmp/sglib"
Parameter Description
name Sets the name for the software library that you want to.
path Sets the preferred credential for this target.

For example:

emcli add_swlib_storage_location 
       -name="Softlib" 
       -path="/var/tmp/sglib"

Creating Scripts

This section describes the setup and configuration of Oracle Site Guard in Enterprise Manager Cloud Control to manage Oracle Fusion Middleware Disaster operations on the primary site and the standby site.

Ensure that you create the scripts that are needed to configure Oracle Site Guard:

Creating Pre-Scripts and Post-Scripts

You can create custom scripts to be executed at the site level for the Oracle Site Guard operation (stop, start, switchover, or failover) workflow. Each script can be associated with more then one host in a site. You can create the following scripts:

  • Pre-Script

  • Post-Script

Create the required scripts and save them in a location of your choice on each of the hosts from where the script will be executed. After creating and testing the script, ensure that you associate the script with Oracle Site Guard, as described in "Associating Pre-Scripts and Post-Scripts".

Notes:

  • A custom script should be a shell script and it must have clearly defined return codes. The script must return 0 on success, and non-zero values on failure.

  • Ensure that you have the required privilege to run the script.

Creating Storage Scripts

You can create the following storage scripts:

  • Mount Script

  • Unmount Script

  • Switchover script

  • Failover Script

Create the required scripts and save them to the location of your choice on each of the hosts from where the script will be executed. After creating and testing the script, you must associate that with Oracle Site Guard, as described in "Associating Storage Scripts".

Oracle Site Guard provides the following sample scripts for Sun ZFS and NetApp Storage appliances:

  • mount_umount.sh

  • zfs_storage_role_reversal.sh

The sample scripts are located in the AGENT_HOME/plugins/oracle.sysman.emas.agent.plugin_12.1.0.4.0/scripts directory after completing the Oracle Management Agent (EM Agent) installation.

Notes:

After running the script, verify that the execution return code value is 0. If you get any other value for the return code, then the script is considered to have failed. Ensure that you implement the script with the proper return code.

The following are examples of scripts Sun ZFS and NetApp Storage appliances:

  • mount_umount.sh

    Run the following command to mount or unmount directories on the storage appliance:

    ./mount_umount.sh [-o operation_type ] [-f directories_to_mount_or_unmount]
    

    Note:

     

    • If there are multiple directories to be mounted or unmounted on the appliance, use commas to separate the directories. Ensure that there are no spaces between the directory names.
    • Ensure that the /etc/fstab file is updated with the devices that you want to mount or unmount.

    For example,

    To mount multiple directories, run the following command:

    ./mount_umount.sh [-o mount] [-f /u02/oracle/config,/u02/oracle/product,/u02/oracle/stage]
    

    To mount a single directory, run the following command:

    ./mount_umount.sh -o mount -f /u01/app/oracle/product/test
    

    To unmount multiple directories, run the following command:

    ./mount_umount.sh [-o unmount] [-f /u02/oracle/config,/u02/oracle/product,/u02/oracle/stage]
    

    To unmount a single directory, run the following command:

    ./mount_umount.sh -o umount -f /u01/app/oracle/product/test
    
  • zfs_storage_role_reversal.sh

    For Sun ZFS appliance:

    Run the following command to switch over storage:

    ./zfs_storage_role_reversal.sh 
            [-t target_appliance]
            [-h source_appliance]
            [-j project_name]
            [-p target_pool_name]
            [-q source_pool_name]
            [-c Y_or_N]
            [-f Y_or_N]
            [-e sync_timeout]
    
    
    Parameter Description
    -t Specify the target appliance name with this parameter.
    -h Specify the source appliance name with this parameter.
    -j Specify the project name with this parameter.
    -p Specify the pool target name with this parameter.
    -q Specify the source pool name with this parameter
    -c Confirm whether sync is needed by specifying Y or N with this parameter.
    -f Confirm whether you want to continue with an error if sync fails, by specifying Y or N with this parameter.

    This parameter is optional.

    If you specify Y as your selection, the script triggers an update or sync from the source to the target appliance. If you specify N as your selection, the script does not trigger an update. If you do not specify the parameter, the script considers the default value Y for switchover and the default value N for failover operation.

    -e Specify sync timeout in seconds. For example, 1800.

    This parameter is optional.

    If you specify Y as your selection, the script continues even if the sync fails. If you specify N as your option, the script discontinues. If you do n

    To specify the parameter, the script considers the default value 1800.


    For example:

    ./zfs_storage_role_reversal.sh -t target.us.oracle.com -h source.example.com -j SGProject -p pool-0 -q pool-1 -c Y -f Y -e 1800
    

    Note:

    Create Host Normal Credentials for target and source storage appliances. These credentials are needed to run zfs_storage_role_reversal.sh.
  • ntapstorage.pl

    Note:

    Create a sample shell script to invoke the perl script, ntapstorage.pl.Ensure that the sample wrapper shell script invokes the ntapstorage.pl script for each pair of source and destination volumes. For example, if there are two pairs of source and destination volumes between the primary and standby sites, then this wrapper script should invoke ntapstorage.pl script twice.

    Run the perl script ntapstorage.pl. Do the following:

    1. Call the perl script, ntapstorage.pl, from the following sample wrapper shell script:

      #!/bin/bash
      perl ntapstorage.pl $@
      
    2. Run the following command to switch over storage:

      ./sample-wrapper.sh -sm <sip1:sv1/dip1:dv1> <update break | resync | break | release | break release | break release resync> [-ntap_src_user <sip2:root/password> -ntap_dest_user <dip2:root/password> -encrypted <true/false> ]
      

      For example:

      ./sample-wrapper.sh -sm primary-storage:vol1/standby-storage:vol2 update
      

Configuring Oracle Site Guard

After creating the required scripts, complete the following steps to configure Oracle Site Guard:

Configuring Sites

Configure the primary and standby sites using generic systems or Fusion instances, and associate them with Oracle Site Guard.

You can add the configuration for the primary and standby sites using one of the following options:

Configuring Sites Using Enterprise Manager Cloud Control Console

To associate the standby system with the primary system, complete the following steps:

  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  3. Select the primary system (created in "Creating Primary and Standby Sites").

  4. Click Generic System > Site Guard > Configure (Fusion Instance > Site Guard > Configure, if you want to configure Oracle Site Guard on a Fusion instance).

    The Site Guard Configuration page is displayed.

  5. In the Standby System(s) section, click Add.

    The Search and Select: Standby Systems page is displayed.

  6. Choose the standby system, and click Select.

  7. Click Save.

Configuring Sites Using EMCLI Commands

To add the configuration for the primary and standby sites, you must run the following emcli commands in the command-line interface:

Note:

For information about logging in to emcli, see chapter "Command Line Interface Concepts and Installation" in the Oracle Enterprise Manager Command Line Interface Guide.
emcli create_siteguard_configuration 
      -primary_system_name="system_name"
      -standby_system_name="system_name"
Parameter Description
-primary_system_name Enter the name of your system, which is associated with the primary site.
-standby_system_name Enter the name of your system, which is associated with the standby site.

To display information about the association between existing primary and standby sites, run the following emcli commands in the command-line interface:

emcli get_siteguard_configuration
         -primary_system_name="system_name"
         -standby_system_name="system_name"

Associating Credentials

You must associate credentials created in "Creating Credentials" with the targets in each site.

Associate the credentials for the following targets:

  • Host, where Oracle Fusion Middleware and Oracle Database are installed and configured (for normal user and users with root privileges)

  • Oracle WebLogic Administration Server

  • Oracle Database

You can associate the credentials using one of the following options:

Associating Credentials Using Enterprise Manager Cloud Control Console

To associate the credentials for the primary site and standby sites, complete the following steps:

  1. From the Targets menu, click Systems (or Fusion Application if you want to configure Oracle Site Guard on a Fusion instance).

  2. On the Systems page, click the name of the system (or the Fusion instance) on which you want to configure Oracle Site Guard.

  3. On the system's home page, from the Generic System menu, select Site Guard, then Configure (or select Fusion Instance > SiteGuard > Configure)

  4. Associate the different types of credentials as described in the following sections:

    Normal Host Credentials

    Associate normal host credentials to run specific commands or scripts on the target host. To associate normal host credentials, follow these steps:

    1. In the Credential tab, under Normal Host Credentials, click Add.

      The Add Normal Host Credentials dialog appears.

    2. Under Target, select the target for which you want to create normal host credentials. Select All to select all the systems in the list.

    3. You can select the credentials set, by default, by selecting the Use Preferred Credentials option on the page. On selecting Use Preferred Credentials, the Named Credentials section is disabled. To select named credentials, deselect Use Preferred Credentials.

    4. Click Save.

    Privileged Host Credentials

    Associate privileged host credentials to mount or unmount storage operations on the target host. To associate privileged host credentials, follow these tasks:

    1. In the Credential tab, under Privileged Host Credentials, click Add.

      The Add Privileged Host Credentials dialog appears.

    2. Under Target, select the target for which you want to create privileged host credentials. Select All to select all the systems in the list.

    3. You can select the credentials set, by default, by selecting the Use Preferred Credentials option on the page. On selecting Use Preferred Credentials, the Named Credentials section is disabled. To select named credentials, deselect Use Preferred Credentials.

    4. Click Save.

    Oracle WebLogic Administration Credentials

    Associate Oracle WebLogic Administration credentials to connect to the administration server, or to start or stop managed servers.

    To associate Oracle WebLogic administration credentials, follow these tasks:

    1. In the Credential tab, under Oracle WebLogic Administration Credentials, click Add.

      The Add Oracle WebLogic Administration Credentials dialog appears.

    2. Under Target, select the target for which you want to create Oracle WebLogic administration credentials. Select All to select all the systems in the list.

    3. You can select the credentials set, by default, by selecting the Use Preferred Credentials option on the page. On selecting Use Preferred Credentials, the Named Credentials section is disabled. To select named credentials, deselect Use Preferred Credentials.

    4. Click Save.

    SYSDBA Database Credentials

    Associate SYSDBA database credentials to perform switchover or failover operations through Data Guard Broker.

    To associate database credentials, follow these tasks:

    1. In the Credential tab, under Database Credentials, click Add.

      The Add Database Credentials dialog appears.

    2. Under Target, select the target for which you want to create Oracle WebLogic administration credentials. Select All to select all the systems in the list.

    3. You can select the credentials set, by default, by selecting the Use Preferred Credentials option on the page. On selecting Use Preferred Credentials, the Named Credentials section is disabled. To select named credentials, deselect Use Preferred Credentials.

    4. Click Save.

Associating Credentials Using EMCLI Commands

Associate the credentials for the targets by running the credential framework emcli commands in the command-line interface:

emcli create_siteguard_credential_association 
        -system_name="name"
        -credential_type="type"
        -credential_name="name" 
        -credential_owner="owner"
        –use_preferred_credential="true or false" 
Parameter Description
-system_name Specify the name of the system, which is associated with the site.
-credential_type Specify the credential type depending on the target:
  • Host: HostNormal

  • Host (users with root privileges): HostPrivileged

  • Oracle WebLogic Server: WLSAdmin

  • Oracle Database: DatabaseSysdba

-credential_name Specify a name for the credential.
-credential_owner Specify the owner of the credential.
–use_preferred_credential If you are using Preferred Credentials, then specify true.

Associating Pre-Scripts and Post-Scripts

You can associate pre-scripts or post-scripts (created in "Creating Pre-Scripts and Post-Scripts") for the Oracle Site Guard operation workflow.

Note:

You can specify the script arguments as name-value pairs with the script. For example, test.sh -param1 value1 -param2 value2.

You can associate pre-scripts and post-scripts using one of the following options:

Associating Pre-Scripts and Post-Scripts Using Enterprise Manager Cloud Control Console

To associate pre-scripts and post-scripts for the primary site, complete the following steps:

  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Targets menu, click Systems (or select Fusion Application).

  3. Select the primary system (created in "Creating Primary and Standby Sites").

  4. Click Generic System > Site Guard > Configure (or select Fusion Instance > Site Guard > Configure).

    The Site Guard Configuration page is displayed.

  5. Click the Pre/Post Scripts tab.

  6. Click Add.

    The Add Pre/Post Scripts page is displayed.

  7. Enter the following details:

    • Script Path: Enter the path to the script, or click the search icon and specify the path to the script.

    • Target Hosts: Select the target name.

    • Script Type: The type of script, depending on the function you want to perform, select one of the following options:

      • Pre-Script

      • Post-Script

    • Operation Type: The function of the operation. Example: Switchover, Failover, Start, or Stop.

    • Role: Select Primary or Standby based on the system role. By default, the script is configured for both primary and standby roles for a given system.

    • Credential Type: Select Normal Host Credentials or Privileged Host Credentials for users with root privileges.

    Click Save.

  8. Use the above steps to associate the pre-scripts and post-scripts for the standby site.

Associating Pre-Scripts and Post-Scripts Using EMCLI Commands

To associate a pre-script or post-script with Oracle Site Guard, run the following emcli commands in the command-line interface:

emcli create_siteguard_script
        -system_name= "name"
        -operation="operation_name"
        -script_type="script_type"
        -host_name="name_of_the_host"
        [-target_storage_credential_name="name"]
        [-source_storage_credential_name="name"]       
        -path="path_of_the_script"
        -all_hosts="true"
        –credential_type="type"
        -role="role"

Note:

[ ] indicates that the parameter is optional.
Parameter Description
-system_name Specify the system on which you are performing the operation.
-operation The function of the operation. Example: Switchover, Failover, Start, or Stop.
-script_type The type of script, depending on the function you want to perform select one of the following options:
  • Pre-Script

  • Post-Script

-path Enter the path to the script.
-host_name The name of the host where the script will be run.

Note: Ensure that the hostname is part of the system specified in system_name.

-target_storage_credential_name Specify named credential for target storage appliance. If target_storage_credential_name is specified then source_storage_credential_name and credential_owner have to be specified.
-source_storage_credential_name Specify named credential for source storage appliance. If source_storage_credential_name is specified then target_storage_credential_name and credential_owner have to be specified.
-all_hosts Specify this optional flag to enable the script to run on all the hosts in the system. This parameter overrides the host_name.
–credential_type Specify HostNormal credentials or HostPrivileged credentials for users with root privileges.
-role Specify the role of the system when the script is run.

For example: Primary or Standby.


Associating Storage Scripts

You can associate storage scripts (created in "Creating Storage Scripts") for the Oracle Site Guard operation workflow.

You can associate the storage scripts using one of the following options:

Associating Storage Scripts Using Enterprise Manager Cloud Control Console

To associate storage scripts for the primary site, complete the following steps:

  1. Log in to Enterprise Manager as an EM_CLOUD_ADMINISTRATOR user.

  2. From the Targets menu, click Systems (or select Fusion Application).

  3. Select the primary system (created in "Creating Primary and Standby Sites").

  4. Click Generic System > Site Guard > Configure (or select Fusion Instance > Site Guard > Configure).

    The Site Guard Configuration page is displayed.

  5. Click the Storage Scripts tab.

  6. Click Add.

    The Add Storage Scripts page is displayed.

  7. Enter the following details:

    • Script Path: Enter the path to the script or click the search icon, and specify the path to the script.

    • Target Hosts: Select the target name.

    • Script Type: The type of script, depending on the function you want to perform, select one of the following options:

      • Mount

      • UnMount

      • Storage-Switchover

      • Storage-Failover

    • Operation Type: The function of the operation. Example: Switchover or Failover.

    • Credential Type: Select Normal Host Credentials or Privileged Host Credentials for users with root privileges.

    Click Save.

  8. To associate the storage scripts for the standby site, follow steps 1-7.

Associating Storage Scripts Using EMCLI Commands

You must associate the following storage scripts:

Mount Scripts for Primary and Standby Sites

To associate a mount script, run the following emcli commands in the command-line interface:

emcli create_siteguard_script
        -system_name="system_name"
        -operation="operation_name"
        -script_type="Mount"
        [-target_storage_credential_name="name"]
        [-source_storage_credential_name="name"]       
        -host_name="name of the host"
        -path="path_of_the­_script"
        -all_hosts= "true"
        –credential_type="type" 

Note:

[ ] indicates that the parameter is optional.

Unmount Script for Primary and Standby Sites

To associate a pre-script or post-script, run the following emcli commands in the command-line interface:

emcli create_siteguard_script
        -system_name="system_name"
        -operation="operation_name"
        -script_type= "UnMount"
        [-target_storage_credential_name="name"]
        [-source_storage_credential_name="name"]       
        -host_name="name_of_the_host"
        -path="path_of_the_script"
        -all_hosts="true"
        –credential_type="type"

Note:

[ ] indicates that the parameter is optional.

Switchover Script for Primary and Standby Sites

To associate a pre-script or post-script, run the following emcli commands in the command-line interface:

emcli create_siteguard_script
        -system_name="system_name"
        -operation="operation_name"
        -script_type="Storage-Switchover"
        [-target_storage_credential_name="name"]
        [-source_storage_credential_name="name"]       
        -host_name="name_of_the_host"
        -path="path_of_the_script"
       -all_hosts="true"
       –credential_type="type"

Note:

[ ] indicates that the parameter is optional.

Failover Script for Primary and Standby Sites

To associate a pre-script or post-script, run the following emcli commands in the command-line interface:

emcli create_siteguard_script
        -system_name="system_name"
        -operation="operation_name"
        -script_type="Storage-Failover"
        [-target_storage_credential_name="name"]
        [-source_storage_credential_name="name"]       
        -host_name="name_of_the_host"
        -path="path_of_the_script"
        -all_hosts="true"
        –credential_type="type"

Note:

[ ] indicates that the parameter is optional.

Executing Oracle Site Guard Operations

An operation plan contains the execution flow for the Oracle Site Guard operation. You can use it to define the order in which steps of an operation are executed. To execute any Oracle Site Guard operation, you must create an operation plan. An operation plan contains the execution flow for a Oracle Site Guard operation. For example, stopping Oracle HTTP Servers, stopping the Managed Servers and Administration Server in a WebLogic domain, and so on. You can either use the default operation plan or customize it according to your needs. You can execute operation plans as needed.

Ensure that you must complete the following steps before you perform an operation:

Creating an Operation Plan

Creating an Operation Plan Using EMCLI Commands

You can create an operation plan by running the following emcli commands in the command-line interface:

For switchover or failover operations:

emcli create_operation_plan
        -name="name"
        -primary_system_name="primary_system_name"
        -standby_system_name="standby_system_name"
        -operation_plan="operation_name"

For starting or stopping a site:

emcli create_operation_plan
        -name="name"
        -system_name="name"
        -operation_plan="operation_name"
Parameter Description
name Set the name of the operation plan.
primary_system_name Set the name of the primary system. This parameter is set for switchover or failover operation only.
standby_system_name Set the name of the standby system. This parameter is set for switchover or failover operation only.
system_name Enter the name of the system.
operation_plan Enter the name of the operation plan.

For a sample of the emcli command for creating an operation plan using the command-line interface, see Example F-2 in Appendix F, "create_operation_plan".

Creating an Operation Plans Using Enterprise Manager Cloud Control Console

To create an operation plan using the Enterprise Manager Cloud Control Console, follow these tasks:

  1. From the Targets menu, click Systems (or Fusion Application if Oracle Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system on which you want to create Oracle Site Guard operation plans (or select a Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).

  4. Click Create. The Create New Operation Plan screen is displayed.

  5. Enter a plan name.

  6. From the list, select the type of operation that you want to perform. The options available are Switchover, Failover, Start, and Stop.

  7. The Primary System element on the page displays the name of the system for which this plan is being created.

  8. From the list of Standby System, select the system that you want to set as the standby system for the switchover or failover operation. For start or stop operations, select the system in its current role.

  9. Click Save.

Updating an Operation Plan

You can perform the following actions to update an operation plan:

Changing Execution Orders

You can modify the order in which the steps are executed in an operation plan. For example, you can start the Oracle Identity Manager domain before starting any other Oracle WebLogic Server domain in a site or the order of an individual step in an operation plan, using one of the following methods:

Changing Execution Orders Using EMCLI Command

Change the execution order of the operation plan by running the following command in a command-line interface:

emcli update_operation_plan
         -name="plan_name"
         -step_number="7"
         -move="Up"
Changing Execution Orders Using Enterprise Manager Cloud Control Console

Change the execution order of the operation plan by following these steps in the Enterprise Manager Cloud Console:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column. The steps associated with the operation plan are listed in the Edit Plan Operation table. Each row in the table represents a step that is executed as part of the operation plan.

  5. Click Edit to enable the options for updating the operation plan.

  6. Click Move Up or Move Down depending on the sequence in which you want to rearrange the execution orders.

  7. Click Save.

Updating Execution Modes

The execution mode determines whether the steps pertaining to a target type in the site runs in parallel (executed simultaneously) or in serial mode. The execution mode can be either Serial or Parallel.

Updating Execution Modes Using EMCLI Command

Update the execution mode by running the following emcli command in the command-line interface:

emcli update_operation_plan 
         –name="plan_name" 
         –step_number="2"  
         –execution_mode="Parallel"
Updating Execution Modes Using Enterprise Manager Cloud Control Console

Update the execution mode of an operation plan by following these steps in the Enterprise Manager Cloud Console:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column. The steps associated with the operation plan are listed in the Edit Plan Operation table. Each row in the table represents a step that is executed as part of the operation plan.

  5. Click Edit to enable the options for updating the operation plan.

  6. In the Execution Mode column, choose from the options listed in the drop-down menu. You can choose to execute the plan in parallel mode or in serial mode.

  7. Click Save.

Disabling a Step

You can disable any step in an operation plan by following one of the following methods:

Disabling a Step Using EMCLI Commands

Disable a step in an operation plan by running the following emcli command in the command-line interface:

emcli update_operation_plan 
         –name="plan_name" 
         –step_number="2"  
         –enabled="false"
Disabling a Step Using Enterprise Manager Cloud Control Console

Disable a step in an operation plan by following these steps in the Enterprise Manager Cloud Console:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column. The steps associated with the operation plan are listed in the Edit Plan Operation table. Each row in the table represents a step that is executed as part of the operation plan.

  5. Click Edit to enable the options for updating the operation plan.

  6. In the Run Mode column, choose from the options listed in the drop-down menu. You can choose to enable or disable a target.

  7. Click Save.

Deleting a Step

You can delete any step in an operation plan by following one of the following methods:

Deleting a Step Using EMCLI Commands

Delete a step in an operation plan by running the following emcli command in the command-line interface:

emcli update_operation_plan 
         –name="plan_name" 
         –step_number="2"  
         –delete="true"
Deleting a Step Using Enterprise Manager Cloud Control Console

Delete a step in an operation plan by following these steps in the Enterprise Manager Cloud Console:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column. The steps associated with the operation plan are listed in the Edit Plan Operation table. Each row in the table represents a step that is executed as part of the operation plan.

  5. Click Delete.

  6. Click Save.

Running Precheck Utility

Oracle Site Guard automatically runs the precheck utility before performing any operation. You can also run the precheck utility separately, before executing any Oracle Site Guard operations. Oracle Site Guard performs the following prechecks:

  • Checks whether the Fusion Middleware Farms running on the primary site are down, before performing a failover operation.

  • Checks the agent status on all hosts involved in the operation.

  • Checks if any new targets are added to the generic system after the operation plan is created.

  • Checks whether all targets involved in the operation plan exist in the Enterprise Manager repository.

  • Detects if any targets are moved out or deleted from the generic system after the operation plan is created.

  • Asserts the existence of all configured scripts (pre/post/mount/unmount/storage role reversal) on their respective target hosts.

  • Runs Oracle Data Guard Broker prechecks to ascertain whether the Database is ready for role reversal (for switchover/failover operation)

  • Performs Database Role Checks

To run the precheck utility, use one of the following methods:

Running Precheck Utility Using Command-Line Interface

To run the precheck utility using EMCLI commands, run the following command:

emcli run_prechecks
       -operation_plan="operation_plan_name"
Parameter Description
-operation_plan Enter the name of your operation plan.

You can also monitor the status of a precheck operation using Enterprise Manager Cloud Console.

Note:

For more information, see Appendix F, "run_prechecks".

Running Precheck Utility Using Enterprise Manager Cloud Control Console

To run a precheck utility using the Enterprise Manager Cloud Control console follow these steps:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column.

  5. Click Run Prechecks.

  6. Confirm the action by clicking Yes.

Submitting an Operation Plan

Submit an operation plan by using one of the following methods:

Submitting an Operation Plan Using EMCLI Command

Submit an operation plan by running the following emcli command in the command-line interface:

emcli submit_operation_plan
        -name="operation plan_name" 
       [-run_prechecks={true|false}]
Parameter Description
-name Enter the name of the operation plan.
-run_prechecks Enter false, if you do not want to run precheck. For more information, see "Running Precheck Utility".

Note:

For more information, see Appendix F, "submit_operation_plan".

Submitting an Operation Plan Using Enterprise Manager Cloud Control Console

To run a precheck utility using the Enterprise Manager Cloud Control console follow these steps:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column.

  5. Click Execute Operation. The Confirmation screen appears.

  6. Select Run PreChecks on the Confirmation screen.

  7. Click Yes to submit the operation plan.

Monitoring an Operation Plan

Monitor an operation plan submitted for execution, using one of the following methods:

Monitoring an Operation Plan Using Enterprise Manager Cloud Control Console

To monitor an operation plan submitted for execution, complete the following steps:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click Operation Activities. A table listing all of the submitted operation plan executions is displayed.

To view details of all of the activities, in addition to the operation plans, running on the systems, follow these steps:

  1. Click Procedure Activity that is listed in Provisioning and Patching in the Enterprise menu. The Provisioning page is displayed.

  2. Click the Procedure Activity tab.

    A list of procedure activities is displayed in the Run column.

  3. Click on the specific procedure activity to view details. A procedure-steps tree specific to that activity, is displayed.

  4. Select an execution step from the Procedure Steps tree to view the details.

Monitoring an Operation Plan Using EMCLI Command

You can also verify the status of an executed operation plan by running the following emcli command in the command-line interface:

emcli get_instance_status -instance="GUID"

To get the GUID information, run the following command:

emcli get_instances 
       -type="SiteGuard"

Error Management Framework

Oracle Site Guard uses the Enterprise Manager Cloud Control deployment procedures framework to orchestrate disaster recovery operations on remote hosts. The framework provides error management support through error modes (stop and continue). In a disaster recovery scenario, it is very likely that things may go wrong. For example, some hosts might go down, become unreachable, or some servers might not start. To address such failures, Oracle Site Guard provides an option to define the error mode for individual steps and also lets you enable or disable steps. By default, the error mode is stop, and the run mode is enabled. This section includes the following topics:

Note:

For more information, see "Troubleshooting Oracle Site Guard Issues".

Error Modes

You can define the following error modes for individual targets in a step for any given operation plan:

Stop Error Mode

The execution flow stops if the step fails. The status of the step becomes Action Required. You must manually confirm this failure from Enterprise Manager Cloud Control console to restart the execution. The execution flow continues after the confirmation, but the failed step is not retried. The failed step can be retried at the job level from the console but the status of the retry operation is not reflected at the target level status or at the top-level step status. This is the default error mode. See Figure 34-3 and Figure 34-4.

Figure 34-3 Status Details

Description of Figure 34-3 follows
Description of "Figure 34-3 Status Details"

Figure 34-4 Stop Error Mode

Description of Figure 34-4 follows
Description of "Figure 34-4 Stop Error Mode"

Continue Error Mode

In this error mode, execution flow continues even if the step fails. The status of the step shows Failed, but the operation continues and the top-level step status shows Completed with Errors. Figure 34-5 shows an example of continue error mode.

Figure 34-5 Continue Error Mode

Description of Figure 34-5 follows
Description of "Figure 34-5 Continue Error Mode"

Updating Error Modes in an Operation Plan

You can update error modes in an operation plan by using one of the following methods:

Updating an Error Mode in an Operation Plan Using EMCLI Commands

Update the error modes in an operation plan by running the following emcli command in the command-line interface:

emcli update_operation_plan
        -name="plan_name"
        -step_number={step number}
        -target_host={host name}
        -error_mode={error mode}
Parameter Description
-name The name of the operation plan.
-step_number Number of the step which should be updated
-target_host The name of the system. Enter this option for Start or Stop operation.
-error_mode The error mode type. For example, Stop or Enabled.

Figure 34-6 shows an example of a user-defined operation plan.

Figure 34-6 Updating Error Mode

Description of Figure 34-6 follows
Description of "Figure 34-6 Updating Error Mode"

Updating an Error Mode in an Operation Plan Using Enterprise Manager Cloud Control Console

To update an error mode using the Enterprise Manager Cloud Control Console, follow these steps:

  1. From the Targets menu, click Systems (or Fusion Application if Site Guard is configured on a Fusion instance).

  2. On the Systems page, click the name of the system that you want to update (or click the Fusion instance).

  3. On the system's home page, from the Generic System menu, select Site Guard, then Operations (or select Fusion Instance > Site Guard > Operations).The Site Guard Operations page is displayed.

  4. Click on the plan listed in the Plan Name column. A table displayed in the Edit Operation Plan section lists the targets associated with the plan.

  5. Click Edit to enable the options for updating the operation plan.

  6. In the Error Mode column, choose from the options listed in the drop-down menu.

  7. Click Save.

Retrying a Failed Operation Using Enterprise Manager Cloud Control Console

To retry a failed operation, complete the following steps:

  1. Log in to Enterprise Manager Cloud Control Console as an EM_CLOUD_ADMINISTRATOR user.

  2. Click Enterprise > Provisioning and Patching > Procedure Activity.

    The Provisioning page is displayed.

  3. Click the Procedure Activity tab.

  4. Select the failed operation, and click Action Required.

  5. In Embedded Procedure Step, click Action Required.

  6. Select the failed operation, and click Failed.

  7. In Target, select the failed operation, and click Failed.

  8. Switch to Classic View.

  9. Click Enterprise > Provisioning and Patching > Procedure Activity Credentials.

  10. Click Procedure Activity.

  11. Select the failed operation, and click Action Required.

  12. In Embedded Procedure Step, click Action Required.

  13. Select the failed operation, and click Action Required.

  14. Click Confirm.

Managing a Site Using Oracle Site Guard

You can use EMCLI commands or the Enterprise Manager Cloud Control console to execute the following Oracle Site Guard operations:

Note:

See Appendix F, "Oracle Site Guard Command-Line Interface Reference" for a list of EMCLI commands to manage an Oracle Site Guard configuration directly from the command-line interface.

Stopping a Site

Use one of the following methods to stop a site:

Stopping a Site Using EMCLI Command

To stop a site, run the following EMCLI command in the command-line interface:

emcli submit_operation_plan 
              -name="stop-site1" 
              -run_prechecks="true"
Parameter Description
-name Specify the name of the site that you want to stop.
-run_prechecks Enter true or false. The value of this parameter is true, by default.

Stopping a Site Using Enterprise Manager Cloud Control Console

See "Creating an Operation Plan".

Starting a Site

Use one of the following methods to start a site:

Starting a Site Using EMCLI Command

To start a site, run the following EMCLI command in the command-line interface:

emcli submit_operation_plan 
             -name="start-site1" 
             -run_prechecks="true"
Parameter Description
-name Specify the name of the site that you want to start.
-run_prechecks Enter true or false. The value of this parameter is true, by default.

Starting a Site Using Enterprise Manager Cloud Control Console

See "Creating an Operation Plan".

Performing Site Switchover

Use one of the following methods to perform a site switchover:

Performing a Site Switchover Using EMCLI Command

To perform a site switchover, run the following emcli command in the command-line interface:

emcli submit_operation_plan 
        -name="switchover-site1"
        -run_prechecks="true" 
Parameter Description
-name Specify the name of the site for which you want to perform a switchover.
-run_prechecks Enter true or false.

Performing a Site Switchover Using Enterprise Manager Cloud Control Console

See "Creating an Operation Plan".

Performing Site Failover

Use one of the following methods to perform a site failover:

Performing a Site Failover Using EMCLI Command

To perform a site failover, run the following emcli command in the command-line interface:

emcli submit_operation_plan 
        -name="failover-site1"
        -run_prechecks="true" 
Parameter Description
-name Specify the name of the site for which you want to perform a failover.
-run_prechecks Enter true or false.

After performing a failover operation, reinstate the database manually. For more information, see "How to Reinstate a Database" in the Oracle Data Guard Broker.

Performing a Site Failover Using Enterprise Manager Cloud Control Console

See "Creating an Operation Plan".